-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Remove deprecated framework interfaces #32327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecated framework interfaces #32327
Conversation
…o a lib/internal/Magento/Framework/Mail/TemplateTypesInterface namespase
… was removed. getMetadata method was movet to lib/internal/Magento/Framework/Filesystem/DriverInterface
… removed. The behavior of the Magento\Framework\Module\Manager::isOutputEnabled has changed
…been removed. List of deleted unused classes that depended on this interface lib/internal/Magento/Framework/View/Asset/Bundle, lib/internal/Magento/Framework/View/Asset/Bundle/Config, lib/internal/Magento/Framework/View/Asset/Bundle/Manager
…Interface has been removed. The Unused deprecated class app/code/Magento/Ui/Model/Manager that implements this interface has been removed
…removed. The Unused deprecated class lib/internal/Magento/Framework/Session/SidResolver that implements this interface has been removed
…face.php was removed. getMetadata method was movet to lib/internal/Magento/Framework/Filesystem/DriverInterface" This reverts commit 0a7c0b3452208df4709632e7aa12741b1153457e.
Hi @vlmed. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @vlmed, thank you for your contribution! |
Description (*)
I created a separate commits for each interface from issue. Since each interface had many dependencies that needed to be edited. In my opinion, it will be easier to review PR.

What done:
1.
ilb/internal/Magento/Framework/App/Action/HttpHeadActionInterface.php
- HttpHeadActionInterface was removed.
- All dependency have been fixed.
2. lib/internal/Magento/Framework/App/TemplateTypesInterface.php
- This interface implements 5 classes end extends
Magento\Framework\Mail\TemplateInterface
. And it has comment@deprecated 101.0.0 because of incorrect location
.According to the dependencies of
lib/internal/Magento/Framework/App/TemplateTypesInterface.php
and comment I moved this interface toMagento\Framework\Mail
namespace instead of removing.3. lib/internal/Magento/Framework/Filesystem/ExtendedDriverInterface.php
-
ExtendedDriverInterface
has been removed and implementation moved toDriverInterface
.- But the classes implementing
DriverInterface
were broken. Because this requires the implementation of thegetMetadata()
method.4. lib/internal/Magento/Framework/Image/Adapter/UploadConfigInterface.php
-
UploadConfigInterface
has been removed.-
Magento\Framework\Image\Adapter\Config
implements this interface. So I removed unused deprecated methodsgetMaxWidth()
andgetMaxHeight()
and unused deprecated contants from this class.- All dependencies have been fixed.
5.
lib/internal/Magento/Framework/Module/Output/ConfigInterface.php
-
ConfigInterface
has been removed;-
Magento\Framework\Module\Output\Config
is deprecated and implements this interface. So I removed it too. This class is using only in the classMagento\Framework\Module\Manage
.- I changed the behaviour of the deprecated method
Magento\Framework\Module\Manage::isOutputEnabled
. I removed the code belonging to the classMagento\Framework\Module\Output\Config
from theisOutputEnabled
method.6.
lib/internal/Magento/Framework/Option/ArrayInterface.php
-
ArrayInterface.php
has been removed;- All dependencies have been fixed;
7.
lib/internal/Magento/Framework/Session/SidResolverInterface.php
-
SidResolverInterface
has been removed;-
Magento\Framework\Session\SidResolver
is deprecated and implements this interface. SIDs in URLs are no longer used. So I removed this class too.- I removed
Magento\Framework\Session\SidResolver
from all classes where it was**8.
lib/internal/Magento/Framework/View/Asset/Bundle/ConfigInterface.php
-
ConfigInterface
has been removed.- I also removed deprecated unused classes that are associated with each other and this interface:
-
Magento\Framework\View\Asset\Bundle\Config
-
Magento\Framework\View\Asset\Bundle\Manager
-
Magento\Framework\View\Asset\Bundle
-
Magento\Framework\View\Test\Unit\Asset\Bundle\ManagerTest
-
Magento\Framework\View\Test\Unit\Asset\BundleTest
9.
lib/internal/Magento/Framework/View/Element/UiComponent/Config/ManagerInterface.php
-
ManagerInterface
has been removed;-
Magento\Ui\Model\Manager
is deprecated and implements this interface. So I removed it too. This class is using only in the classMagento\Framework\View\Element\UiComponentFactory
.- Some constants from
ManagerInterface
are using in the classMagento\Framework\View\Element\UiComponentFactory
. So i moved them to the classUiComponentFactory
- All dependencies has been fixed;
**10.
lib/internal/Magento/Framework/MessageQueue/ConfigInterface.php
**In most cases this interface is only passed in the constructor and is not used.
But there are a few places where it or its constants are still used.
Used in:
Magento\MessageQueue\Console\ConsumerListCommand
Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\MessageQueue
Magento\Framework\MessageQueue\Config\Consumer\ConfigReaderPlugin
Magento\Framework\MessageQueue\Config\Publisher\ConfigReaderPlugin
Magento\Framework\MessageQueue\Config\Reader\Env\Validator
Magento\Framework\MessageQueue\Config\Reader\Xml\Converter\TopicConfig
Magento\Framework\MessageQueue\Config\Topology\ConfigReaderPlugin
Related Pull Requests
https://github.com/magento/partners-magento2ee/pull/512
https://github.com/magento/partners-magento2b2b/pull/558
magento/inventory#3294
magento/magento2-page-builder#735
https://github.com/magento/magento2-page-builder-ee/pull/187
Fixed Issues (if relevant)
Questions or comments
Contribution checklist (*)